package com.corecloud.mapper.oracle;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * 用户表
 *
 * @author CCW
 * @email 452050507@qq.com
 * @date 2020-08-24 17:46:00
 */
@Mapper
public interface AafUserMapper {



	/**
	 * 根据条件查询大唐用户信息
	 *
	 * @return 大唐用户信息集合
	 */
	@Select({"<script>select a.*, " ,
			"(select c.division_name  " ,
			"from ADMIN_DIVISION c " ,
			"where c.division_level = 3 " ,
			"start with c.division_id = a.division_id " ,
			"connect by prior c.division_pid = c.division_id) city, " ,
			"(select c.division_name " ,
			"from ADMIN_DIVISION c " ,
			"where c.division_level = 4 " ,
			"start with c.division_id = a.division_id " ,
			"connect by prior c.division_pid = c.division_id) managerarea, " ,
			"(select d.xxmc from ZZ_XX_JBXX d where d.id = a.dept_id) school " ,
			"from IDEA_USER a where user_type&lt;&gt;0 and a.user_id = #{username} ",
			"</script>"})
	Map<String,Object> queryUserByUserNameSql(String username);


}
